package scoping;

import java.util.ArrayList;
import java.util.List;

import scoping.blocks.ScopeBlock;

public class ScopeTree {
	private ScopeTree _parent;
	private List<ScopeTree> _children;
	private ScopeBlock _block;	
	
	public ScopeTree(ScopeTree parent, ScopeBlock block) {
		_parent = parent;
		_block = block;
		_children = new ArrayList<ScopeTree>();
	}

	public ScopeTree getParent(){
		return _parent;
	}
	
	public List<ScopeTree> getChildren(){
		return _children;
	}
	
	public void addChild(ScopeTree child){
		_children.add(child);
	}
	
	public void addChildren(List<ScopeTree> children){
		_children.addAll(children);
	}
	
	public ScopeBlock getBlock(){
		return _block;
	}
	
}
